package com.beiing.tianshuai.tianshuai.util;

import android.annotation.TargetApi;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.util.ArrayMap;

import com.beiing.tianshuai.tianshuai.R;

import java.util.LinkedHashMap;
import java.util.TreeMap;

/**
 * Created by LZQ on 2018/1/3.
 */


@TargetApi(Build.VERSION_CODES.KITKAT)
public class EmotionUtils {

    public static LinkedHashMap<String, Integer> EMOTION_CLASS_MAP;

    static {
        EMOTION_CLASS_MAP = new LinkedHashMap<>();
        EMOTION_CLASS_MAP.put("[ee_1.png]", R.drawable.ee_1);
        EMOTION_CLASS_MAP.put("[ee_2.png]", R.drawable.ee_2);
        EMOTION_CLASS_MAP.put("[ee_3.png]", R.drawable.ee_3);
        EMOTION_CLASS_MAP.put("[ee_4.png]", R.drawable.ee_4);
        EMOTION_CLASS_MAP.put("[ee_5.png]", R.drawable.ee_5);
        EMOTION_CLASS_MAP.put("[ee_6.png]", R.drawable.ee_6);
        EMOTION_CLASS_MAP.put("[ee_7.png]", R.drawable.ee_7);
        EMOTION_CLASS_MAP.put("[ee_8.png]", R.drawable.ee_8);
        EMOTION_CLASS_MAP.put("[ee_9.png]", R.drawable.ee_9);
        EMOTION_CLASS_MAP.put("[ee_10.png]", R.drawable.ee_10);
        EMOTION_CLASS_MAP.put("[ee_11.png]", R.drawable.ee_11);
        EMOTION_CLASS_MAP.put("[ee_12.png]", R.drawable.ee_12);
        EMOTION_CLASS_MAP.put("[ee_13.png]", R.drawable.ee_13);
        EMOTION_CLASS_MAP.put("[ee_14.png]", R.drawable.ee_14);
        EMOTION_CLASS_MAP.put("[ee_15.png]", R.drawable.ee_15);
        EMOTION_CLASS_MAP.put("[ee_16.png]", R.drawable.ee_16);
        EMOTION_CLASS_MAP.put("[ee_17.png]", R.drawable.ee_17);
        EMOTION_CLASS_MAP.put("[ee_18.png]", R.drawable.ee_18);
        EMOTION_CLASS_MAP.put("[ee_19.png]", R.drawable.ee_19);
        EMOTION_CLASS_MAP.put("[ee_20.png]", R.drawable.ee_20);
        EMOTION_CLASS_MAP.put("[ee_21.png]", R.drawable.ee_21);
        EMOTION_CLASS_MAP.put("[ee_22.png]", R.drawable.ee_22);
        EMOTION_CLASS_MAP.put("[ee_23.png]", R.drawable.ee_23);
        EMOTION_CLASS_MAP.put("[ee_24.png]", R.drawable.ee_24);
        EMOTION_CLASS_MAP.put("[ee_25.png]", R.drawable.ee_25);
        EMOTION_CLASS_MAP.put("[ee_26.png]", R.drawable.ee_26);
        EMOTION_CLASS_MAP.put("[ee_27.png]", R.drawable.ee_27);
        EMOTION_CLASS_MAP.put("[ee_28.png]", R.drawable.ee_28);
        EMOTION_CLASS_MAP.put("[ee_29.png]", R.drawable.ee_29);
        EMOTION_CLASS_MAP.put("[ee_30.png]", R.drawable.ee_30);
        EMOTION_CLASS_MAP.put("[ee_31.png]", R.drawable.ee_31);
        EMOTION_CLASS_MAP.put("[ee_32.png]", R.drawable.ee_32);
        EMOTION_CLASS_MAP.put("[ee_33.png]", R.drawable.ee_33);
        EMOTION_CLASS_MAP.put("[ee_34.png]", R.drawable.ee_34);
        EMOTION_CLASS_MAP.put("[ee_35.png]", R.drawable.ee_35);
        EMOTION_CLASS_MAP.put("[ee_36.png]", R.drawable.ee_36);
        EMOTION_CLASS_MAP.put("[ee_37.png]", R.drawable.ee_37);
        EMOTION_CLASS_MAP.put("[ee_38.png]", R.drawable.ee_38);
        EMOTION_CLASS_MAP.put("[ee_39.png]", R.drawable.ee_39);
        EMOTION_CLASS_MAP.put("[ee_40.png]", R.drawable.ee_40);
        EMOTION_CLASS_MAP.put("[ee_41.png]", R.drawable.ee_41);
        EMOTION_CLASS_MAP.put("[ee_42.png]", R.drawable.ee_42);
        EMOTION_CLASS_MAP.put("[ee_43.png]", R.drawable.ee_43);
        EMOTION_CLASS_MAP.put("[ee_44.png]", R.drawable.ee_44);
        EMOTION_CLASS_MAP.put("[ee_45.png]", R.drawable.ee_45);
        EMOTION_CLASS_MAP.put("[ee_46.png]", R.drawable.ee_46);
        EMOTION_CLASS_MAP.put("[ee_47.png]", R.drawable.ee_47);
        EMOTION_CLASS_MAP.put("[ee_48.png]", R.drawable.ee_48);
        EMOTION_CLASS_MAP.put("[ee_49.png]", R.drawable.ee_49);
        EMOTION_CLASS_MAP.put("[ee_50.png]", R.drawable.ee_50);
        EMOTION_CLASS_MAP.put("[ee_51.png]", R.drawable.ee_51);
        EMOTION_CLASS_MAP.put("[ee_52.png]", R.drawable.ee_52);
        EMOTION_CLASS_MAP.put("[ee_53.png]", R.drawable.ee_53);
        EMOTION_CLASS_MAP.put("[ee_54.png]", R.drawable.ee_54);
        EMOTION_CLASS_MAP.put("[ee_55.png]", R.drawable.ee_55);
        EMOTION_CLASS_MAP.put("[ee_56.png]", R.drawable.ee_56);
        EMOTION_CLASS_MAP.put("[ee_57.png]", R.drawable.ee_57);
        EMOTION_CLASS_MAP.put("[ee_58.png]", R.drawable.ee_58);
        EMOTION_CLASS_MAP.put("[ee_59.png]", R.drawable.ee_59);
        EMOTION_CLASS_MAP.put("[ee_60.png]", R.drawable.ee_60);
        EMOTION_CLASS_MAP.put("[ee_61.png]", R.drawable.ee_61);
        EMOTION_CLASS_MAP.put("[ee_62.png]", R.drawable.ee_62);
        EMOTION_CLASS_MAP.put("[ee_63.png]", R.drawable.ee_63);
        EMOTION_CLASS_MAP.put("[ee_64.png]", R.drawable.ee_64);
        EMOTION_CLASS_MAP.put("[ee_65.png]", R.drawable.ee_65);
        EMOTION_CLASS_MAP.put("[ee_66.png]", R.drawable.ee_66);
        EMOTION_CLASS_MAP.put("[ee_67.png]", R.drawable.ee_67);
        EMOTION_CLASS_MAP.put("[ee_68.png]", R.drawable.ee_68);
        EMOTION_CLASS_MAP.put("[ee_69.png]", R.drawable.ee_69);
        EMOTION_CLASS_MAP.put("[ee_70.png]", R.drawable.ee_70);
        EMOTION_CLASS_MAP.put("[ee_71.png]", R.drawable.ee_71);
        EMOTION_CLASS_MAP.put("[ee_72.png]", R.drawable.ee_72);
        EMOTION_CLASS_MAP.put("[ee_73.png]", R.drawable.ee_73);
        EMOTION_CLASS_MAP.put("[ee_74.png]", R.drawable.ee_74);
        EMOTION_CLASS_MAP.put("[ee_75.png]", R.drawable.ee_75);
        EMOTION_CLASS_MAP.put("[ee_76.png]", R.drawable.ee_76);
        EMOTION_CLASS_MAP.put("[ee_77.png]", R.drawable.ee_77);
        EMOTION_CLASS_MAP.put("[ee_78.png]", R.drawable.ee_78);
        EMOTION_CLASS_MAP.put("[ee_79.png]", R.drawable.ee_79);
        EMOTION_CLASS_MAP.put("[ee_80.png]", R.drawable.ee_80);
        EMOTION_CLASS_MAP.put("[ee_81.png]", R.drawable.ee_81);
        EMOTION_CLASS_MAP.put("[ee_82.png]", R.drawable.ee_82);
        EMOTION_CLASS_MAP.put("[ee_83.png]", R.drawable.ee_83);
        EMOTION_CLASS_MAP.put("[ee_84.png]", R.drawable.ee_84);
        EMOTION_CLASS_MAP.put("[ee_85.png]", R.drawable.ee_85);
        EMOTION_CLASS_MAP.put("[ee_86.png]", R.drawable.ee_86);
        EMOTION_CLASS_MAP.put("[ee_87.png]", R.drawable.ee_87);
        EMOTION_CLASS_MAP.put("[ee_88.png]", R.drawable.ee_88);
        EMOTION_CLASS_MAP.put("[ee_89.png]", R.drawable.ee_89);
        EMOTION_CLASS_MAP.put("[ee_90.png]", R.drawable.ee_90);
        EMOTION_CLASS_MAP.put("[ee_91.png]", R.drawable.ee_91);
        EMOTION_CLASS_MAP.put("[ee_92.png]", R.drawable.ee_92);
        EMOTION_CLASS_MAP.put("[ee_93.png]", R.drawable.ee_93);
        EMOTION_CLASS_MAP.put("[ee_94.png]", R.drawable.ee_94);
        EMOTION_CLASS_MAP.put("[ee_95.png]", R.drawable.ee_95);
        EMOTION_CLASS_MAP.put("[ee_96.png]", R.drawable.ee_96);
        EMOTION_CLASS_MAP.put("[ee_97.png]", R.drawable.ee_97);
        EMOTION_CLASS_MAP.put("[ee_98.png]", R.drawable.ee_98);
        EMOTION_CLASS_MAP.put("[ee_99.png]", R.drawable.ee_99);
        EMOTION_CLASS_MAP.put("[ee_100.png]", R.drawable.ee_100);
        EMOTION_CLASS_MAP.put("[ee_101.png]", R.drawable.ee_101);
        EMOTION_CLASS_MAP.put("[ee_102.png]", R.drawable.ee_102);
        EMOTION_CLASS_MAP.put("[ee_103.png]", R.drawable.ee_103);
    }

    public static int getImgByName(String imgName){
        Integer integer;
        integer = EMOTION_CLASS_MAP.get(imgName);
        return integer == null ? -1 : integer;
    }

    public static LinkedHashMap<String, Integer> getEmojiMap(){
        return EMOTION_CLASS_MAP;
    }
}
